#! /usr/bin/python

import sys
import os

print sys.argv

gpfile = open('histo.gnuplot','r')
ofile = open('histo1.gnuplot','w')

y = str((int(sys.argv[1])-1)*2 + 6)
z = str((int(sys.argv[1])-1)*2 + 7)

for line in gpfile.readlines():
    line = line.replace('34',y)
    line = line.replace('35',z)
    ofile.write(line)

ofile.close()

os.system( "gnuplot histo1.gnuplot -")
